package com.hskn.hss.module.messageFlowRecords.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hskn.hss.module.messageFlowRecords.domain.MessageFlowRecords;

import java.util.List;
import java.util.Map;

/**
 * 消息流水Service接口
 * 
 * @author ccm
 * @date 2021-09-14
 */
public interface IMessageFlowRecordsService extends IService<MessageFlowRecords>
{
    /**
     * 查询消息流水
     * 
     * @param id 消息流水主键
     * @return 消息流水
     */
    public MessageFlowRecords selectMessageFlowRecordsById(String id);

    /**
     * 查询消息流水列表
     * 
     * @param messageFlowRecords 消息流水
     * @return 消息流水集合
     */
    public List<MessageFlowRecords> selectMessageFlowRecordsList(MessageFlowRecords messageFlowRecords);

    /**
     * 新增消息流水
     * 
     * @param messageFlowRecords 消息流水
     * @return 结果
     */
    public int insertMessageFlowRecords(MessageFlowRecords messageFlowRecords);

    int insertMessageFlowRecordsOnly(MessageFlowRecords messageFlowRecords);

    /**
     * 修改消息流水
     * 
     * @param messageFlowRecords 消息流水
     * @return 结果
     */
    public int updateMessageFlowRecords(MessageFlowRecords messageFlowRecords);

    /**
     * 批量删除消息流水
     * 
     * @param ids 需要删除的消息流水主键集合
     * @return 结果
     */
    public int deleteMessageFlowRecordsByIds(String[] ids);

    /**
     * 删除消息流水信息
     * 
     * @param id 消息流水主键
     * @return 结果
     */
    public int deleteMessageFlowRecordsById(String id);

    /**
     * 查看是否已读
     * @param userId
     * @param messageId
     * @return
     */
    Boolean isRead(String userId, String messageId);


    Map<String, Map<String, MessageFlowRecords>> getMessageFlowRecordsByUserIdAndMessageIdMap();
}
